﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CTC
{
    public class CTCEvent
    {
        /// <summary>
        /// 通知事件
        /// </summary>
        public delegate void EmptyEvent(byte player);
        /// <summary>
        /// 通知事件
        /// </summary>
        public delegate void MessageEvent(byte player, String msg);
        /// <summary>
        /// 数据包事件
        /// </summary>
        /// <param name="player">P位</param>
        /// <param name="data"></param>
        public delegate void ByteDataEvent(byte player, byte[] data);
        /// <summary>
        /// 指令失败事件
        /// </summary>
        /// <param name="state"></param>
        /// <param name="player"></param>
        /// <param name="inst"></param>
        /// <param name="data"></param>
        public delegate void InstFailDataEvent(byte state,byte player, byte[] inst, byte[] data);
        /// <summary>
        /// 指令成功事件
        /// </summary>
        /// <param name="player"></param>
        /// <param name="inst"></param>
        /// <param name="data"></param>
        public delegate void InstSuccessDataEvent(byte player, byte[] inst, byte[] data);
        /// <summary>
        /// 连接状态变化
        /// </summary>
        /// <param name="state"></param>
        public delegate void ClientConnStateEvent(byte player, CTCClientConnState state);
    }
}
